package com.costeaalex.datedrivenfilecopy.factories;

/**
 * @author Alex Costea
 * 
 * Eraser factory: feeds an eraser to the EraserModel depending on the erasing type.
 * 
 */


import com.costeaalex.datedrivenfilecopy.model.erasers.FTPEraser;
import com.costeaalex.datedrivenfilecopy.model.erasers.NormalEraser;
import com.costeaalex.datedrivenfilecopy.model.interfaces.IEraser;

public class EraserFactory {
	
private String[] connectionData;
	
	public void setFTPConnectionData(String[] connectionData) {
		this.connectionData=connectionData;
	}
	
	public IEraser getEraser(int type) {
		switch(type) {
		case 1:
			return new NormalEraser();
		case 2:
			return new FTPEraser(connectionData);
		}
		return null;
	}
	
}
